﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace HangerSupport
{
	public class HSDefineInfo
	{
		public HSDefineInfo() : this(HSType.kDJ_DC, "多层吊架", "可以设置多层", "吊架多层.bmp")
		{
		}

		public HSDefineInfo(HSDefineInfo defIn)
		{
			this.m_bHasBarZJSJ_Ver = true;
			this.m_bHasBarZJSJ_Lean = true;
			this.m_bExtendToTop = false;
			this.m_dTunnelCompartmentHeight = 2500.0;
            //base.ctor();
			this.m_ptBase = defIn.m_ptBase;
			this.m_strErrorInfo = defIn.m_strErrorInfo;
			this.m_kViewType = defIn.m_kViewType;
			this.m_bHasBarZJSJ_Ver = defIn.m_bHasBarZJSJ_Ver;
			this.m_bHasBarZJSJ_Lean = defIn.m_bHasBarZJSJ_Lean;
			this.m_strName = defIn.m_strName;
			this.m_strBmp = defIn.m_strBmp;
			this.m_strTip = defIn.m_strTip;
			this.m_eType = defIn.m_eType;
			this.m_eLinkType = defIn.m_eLinkType;
			this.m_eLinkDevice1 = defIn.m_eLinkDevice1;
			this.m_eLinkDevice2 = defIn.m_eLinkDevice2;
			this.m_eLinkDevice3 = defIn.m_eLinkDevice3;
			this.m_matVer = new HSMatInfo(defIn.m_matVer);
			this.m_matHor = new HSMatInfo(defIn.m_matHor);
			this.m_matLean = new HSMatInfo(defIn.m_matLean);
			this.m_dDistFromGround = defIn.m_dDistFromGround;
			this.m_dNetWide = defIn.m_dNetWide;
			this.m_nFloorNum = defIn.m_nFloorNum;
			this.m_dOffsetX = defIn.m_dOffsetX;
			this.m_dOffsetY = defIn.m_dOffsetY;
			this.m_dPXHigh = defIn.m_dPXHigh;
			this.m_dPXWide = defIn.m_dPXWide;
			this.m_dPXStartLen = defIn.m_dPXStartLen;
			this.m_dGapHor = defIn.m_dGapHor;
			this.m_dGapVer = defIn.m_dGapVer;
			this.m_dLoopThick = defIn.m_dLoopThick;
			this.m_dLoopLength = defIn.m_dLoopLength;
			this.m_dLoopDiameter = defIn.m_dLoopDiameter;
			this.m_dLinkWide = defIn.m_dLinkWide;
			this.m_dLinkHigh = defIn.m_dLinkHigh;
			this.m_dLinkThick = defIn.m_dLinkThick;
			this.m_dElevation = defIn.m_dElevation;
			this.m_dElevationOffset = defIn.m_dElevationOffset;
			this.m_strElevationName = defIn.m_strElevationName;
			this.m_dHangerDBOffsetDist = defIn.m_dHangerDBOffsetDist;
			this.m_bMirrored = defIn.m_bMirrored;
			this.m_bIsVerPipe = defIn.m_bIsVerPipe;
			this.m_bChangeOnlyBaseHigh = defIn.m_bChangeOnlyBaseHigh;
			this.m_eLinkDeviceDZ = new HSLinkDevice[20];
			this.m_dNetHigh = new double[20];
			for (int i = 0; i < 20; i++)
			{
				this.m_dNetHigh[i] = defIn.m_dNetHigh[i];
			}
			for (int j = 0; j < 20; j++)
			{
				this.m_eLinkDeviceDZ[j] = defIn.m_eLinkDeviceDZ[j];
			}
		}

		public HSDefineInfo(HSType eType, string strName, string strTip, string strBmp)
		{
			this.m_bHasBarZJSJ_Ver = true;
			this.m_bHasBarZJSJ_Lean = true;
			this.m_bExtendToTop = false;
			this.m_dTunnelCompartmentHeight = 2500.0;
            //base.ctor();
			this.m_ptBase = XYZ.Zero;
			this.m_strErrorInfo = "";
			this.m_kViewType = SizeViewType.kSizeViewSize;
			this.m_strName = strName;
			this.m_strBmp = strBmp;
			this.m_strTip = strTip;
			this.m_eType = eType;
			this.m_eLinkType = HSLinkType.kLinkCG;
			this.m_eLinkDevice1 = HSLinkDevice.kLinkDeviceRect;
			this.m_eLinkDevice2 = HSLinkDevice.kLinkDeviceRect;
			this.m_eLinkDevice3 = HSLinkDevice.kLinkDeviceRect;
			this.m_matVer = default(HSMatInfo);
			this.m_matHor = default(HSMatInfo);
			this.m_matLean = default(HSMatInfo);
			this.m_matVer.Init();
			this.m_matHor.Init();
			this.m_matLean.Init();
			this.m_dDistFromGround = 0.0;
			this.m_dNetWide = 2000.0;
			this.m_nFloorNum = 3;
			this.m_dOffsetX = 500.0;
			this.m_dOffsetY = 500.0;
			this.m_dPXHigh = 200.0;
			this.m_dPXWide = 500.0;
			this.m_dPXStartLen = 0.0;
			this.m_dGapHor = 10.0;
			this.m_dGapVer = 10.0;
			this.m_dLoopThick = 10.0;
			this.m_dLoopLength = 20.0;
			this.m_dLoopDiameter = 500.0;
			this.m_dLinkWide = 100.0;
			this.m_dLinkHigh = 100.0;
			this.m_dLinkThick = 10.0;
			this.m_dElevation = 0.0;
			this.m_dElevationOffset = 0.0;
			this.m_strElevationName = "";
			this.m_dHangerDBOffsetDist = 0.0;
			this.m_bMirrored = false;
			this.m_bIsVerPipe = false;
			this.m_bChangeOnlyBaseHigh = false;
			this.m_dNetHigh = new double[20];
			for (int i = 0; i < 20; i++)
			{
				this.m_dNetHigh[i] = 300.0;
			}
			this.m_eLinkDeviceDZ = new HSLinkDevice[20];
			for (int j = 0; j < 20; j++)
			{
				this.m_eLinkDeviceDZ[j] = HSLinkDevice.kLinkDeviceRect;
			}
			bool flag = !this.IsSupport();
			if (flag)
			{
				this.m_dElevationOffset = 3000.0;
			}
			switch (eType)
			{
			case HSType.kZJ_DC:
			case HSType.kZJ_PX:
			case HSType.kZJ_DZ:
				this.m_dNetWide = 2000.0;
				this.m_dNetHigh[1] = 500.0;
				this.m_dNetHigh[2] = 500.0;
				this.m_dPXWide = 1200.0;
				this.m_dDistFromGround = 500.0;
				break;
			case HSType.kZJ_SJ:
				this.m_matVer.SetTypeCode("B");
				this.m_matHor.SetTypeCode("B");
				this.m_matLean.SetTypeCode("B");
				this.m_dNetWide = 1000.0;
				this.m_dNetHigh[0] = 1000.0;
				this.m_dOffsetX = 800.0;
				this.m_dOffsetY = 800.0;
				break;
			case HSType.kZJ_XB:
				this.m_dNetWide = 1000.0;
				break;
			case HSType.kZJ_CB:
				this.m_matHor.SetTypeCode("F");
				this.m_dNetWide = 1000.0;
				break;
			default:
				switch (eType)
				{
				case HSType.kDJ_DC:
				case HSType.kDJ_PX:
				case HSType.kDJ_DZ:
					this.m_dDistFromGround = 500.0;
					this.m_dNetWide = 2000.0;
					this.m_dNetHigh[1] = 500.0;
					this.m_dNetHigh[2] = 500.0;
					this.m_dPXWide = 1200.0;
					break;
				case HSType.kDJ_GJ:
				case HSType.kDJ_SG:
					this.m_dNetHigh[0] = 1000.0;
					this.m_dOffsetX = 100.0;
					this.m_dOffsetY = 100.0;
					this.m_matVer.SetTypeCode("A");
					this.m_matHor.SetTypeCode("B");
					this.m_matVer.m_dHigh = 10.0;
					this.m_matVer.m_dWide = 10.0;
					this.m_matVer.m_dThick = 2.0;
					this.m_eLinkDevice1 = HSLinkDevice.kLinkDeviceCircle;
					this.m_eLinkDevice2 = HSLinkDevice.kLinkDeviceCircle;
					this.m_eLinkDevice3 = HSLinkDevice.kLinkDeviceCircle;
					break;
				case HSType.kDJ_DB:
					this.m_dNetHigh[0] = 1000.0;
					break;
				case HSType.kDJ_DG:
					this.m_matVer.SetTypeCode("A");
					this.m_dNetHigh[0] = 1000.0;
					this.m_matVer.m_dHigh = 10.0;
					this.m_matVer.m_dWide = 10.0;
					this.m_matVer.m_dThick = 5.0;
					this.m_dNetWide = 100.0;
					this.m_eLinkDevice1 = HSLinkDevice.kLinkDeviceCircle;
					break;
				case HSType.kDJ_SL:
					this.m_dNetHigh[0] = 1000.0;
					this.m_dNetWide = 1500.0;
					this.m_dPXWide = 200.0;
					break;
				case HSType.kDJ_ZJ:
					this.m_eLinkType = HSLinkType.kLinkDH;
					this.m_dNetHigh[0] = 1000.0;
					break;
				case HSType.kDJ_YC:
					this.m_dNetWide = 2000.0;
					this.m_dNetHigh[1] = 500.0;
					this.m_dNetHigh[2] = 500.0;
					this.m_dDistFromGround = 1000.0;
					this.m_dOffsetX = 100.0;
					this.m_dOffsetY = 100.0;
					break;
				case HSType.kDJ_DC3:
				case HSType.kDJ_PX3:
					this.m_dDistFromGround = 500.0;
					this.m_dNetWide = 2000.0;
					this.m_dNetHigh[1] = 500.0;
					this.m_dNetHigh[2] = 500.0;
					this.m_dPXWide = 1200.0;
					this.m_dOffsetX = 150.0;
					break;
				}
				break;
			}
		}

		public bool IsSupport()
		{
			return this.m_eType < HSType.kDJ_DC;
		}

		public bool IsLink_BH()
		{
			return this.m_eLinkType == HSLinkType.kLinkBH;
		}

		public bool IsLink_DH()
		{
			return this.m_eLinkType == HSLinkType.kLinkDH;
		}

		public bool IsLink_CG()
		{
			return this.m_eLinkType == HSLinkType.kLinkCG;
		}

		public bool IsSingleLinkPoint()
		{
			return this.m_eType == HSType.kDJ_DB || this.m_eType == HSType.kDJ_DG;
		}

		public bool IsSingleBarHanger()
		{
			return this.m_eType == HSType.kDJ_DB;
		}

		public bool IsMultiFloors()
		{
			return this.m_eType == HSType.kZJ_DC || this.m_eType == HSType.kZJ_PX || this.m_eType == HSType.kZJ_SJ || this.m_eType == HSType.kZJ_DZ || this.m_eType == HSType.kDJ_DC || this.m_eType == HSType.kDJ_PX || this.m_eType == HSType.kDJ_SL || this.m_eType == HSType.kDJ_ZJ || this.m_eType == HSType.kDJ_DC3 || this.m_eType == HSType.kDJ_PX3 || this.m_eType == HSType.kDJ_DZ;
		}

		public bool IsCanLinkBoardBeam()
		{
			bool flag = this.m_eType == HSType.kZJ_SJ || this.m_eType == HSType.kZJ_CB || this.m_eType == HSType.kZJ_XB;
			return !flag;
		}

		public string GetLinkTypeName()
		{
			string result = "";
			bool flag = this.m_eLinkType == HSLinkType.kLinkCG;
			if (flag)
			{
				result = "常规";
			}
			else
			{
				bool flag2 = this.m_eLinkType == HSLinkType.kLinkDH;
				if (flag2)
				{
					result = "对焊";
				}
				else
				{
					bool flag3 = this.m_eLinkType == HSLinkType.kLinkBH;
					if (flag3)
					{
						result = "背焊";
					}
				}
			}
			return result;
		}

		public double GetMultiFloorsHigh()
		{
			double num = 0.0;
			for (int i = 1; i < this.m_nFloorNum; i++)
			{
				num += this.m_dNetHigh[i];
				num += this.m_matHor.m_dHigh;
			}
			bool flag = this.IsSupport();
			if (flag)
			{
				bool flag2 = this.m_eType != HSType.kZJ_DC && this.m_eType != HSType.kZJ_PX && this.m_eType != HSType.kZJ_DZ;
				if (flag2)
				{
					num = -this.m_matHor.m_dHigh;
				}
			}
			else
			{
				bool flag3 = this.m_eType != HSType.kDJ_DC && this.m_eType != HSType.kDJ_PX && this.m_eType != HSType.kDJ_YC && this.m_eType != HSType.kDJ_PX3 && this.m_eType != HSType.kDJ_DC3 && this.m_eType != HSType.kDJ_DZ;
				if (flag3)
				{
					num = 0.0;
				}
			}
			bool flag4 = this.IsSupport();
			if (flag4)
			{
				num += this.m_matHor.m_dHigh;
			}
			return num;
		}

		public void ChangeHighFromBase(double dHighFromBase)
		{
			double highFromBase = this.GetHighFromBase();
			double num = dHighFromBase - highFromBase;
			bool flag = this.IsSupport();
			if (flag)
			{
				bool flag2 = this.m_eType == HSType.kZJ_DC || this.m_eType == HSType.kZJ_PX || this.m_eType == HSType.kZJ_DZ;
				if (flag2)
				{
					this.m_dDistFromGround = dHighFromBase;
					this.m_dElevationOffset -= num;
				}
			}
			else
			{
				this.m_dElevationOffset += num;
				bool flag3 = this.m_eType == HSType.kDJ_DC || this.m_eType == HSType.kDJ_PX || this.m_eType == HSType.kDJ_YC || this.m_eType == HSType.kDJ_PX3 || this.m_eType == HSType.kDJ_DC3 || this.m_eType == HSType.kDJ_DZ;
				if (flag3)
				{
					this.m_dDistFromGround = dHighFromBase;
				}
				else
				{
					this.m_dNetHigh[0] = dHighFromBase;
				}
			}
		}

		public void ChangeHighValueFromBaseOnly(double dHighFromBaseChanged)
		{
			double num = this.GetHighFromBase() + dHighFromBaseChanged;
			bool flag = this.IsSupport();
			if (flag)
			{
				bool flag2 = this.m_eType == HSType.kZJ_DC || this.m_eType == HSType.kZJ_PX || this.m_eType == HSType.kZJ_DZ;
				if (flag2)
				{
					bool flag3 = num > 0.0;
					if (flag3)
					{
						this.m_dDistFromGround = num;
					}
					else
					{
						this.m_dElevationOffset -= dHighFromBaseChanged;
					}
				}
				bool flag4 = this.m_eType == HSType.kZJ_XB || this.m_eType == HSType.kZJ_SJ || this.m_eType == HSType.kZJ_CB;
				if (flag4)
				{
					this.m_dElevationOffset += dHighFromBaseChanged;
				}
			}
			else
			{
				bool flag5 = this.m_eType == HSType.kDJ_DC || this.m_eType == HSType.kDJ_PX || this.m_eType == HSType.kDJ_YC || this.m_eType == HSType.kDJ_PX3 || this.m_eType == HSType.kDJ_DC3 || this.m_eType == HSType.kDJ_DZ;
				if (flag5)
				{
					bool flag6 = num > 0.0;
					if (flag6)
					{
						this.m_dDistFromGround = num;
					}
					else
					{
						this.m_dElevationOffset -= dHighFromBaseChanged;
					}
				}
				else
				{
					bool flag7 = this.m_eType == HSType.kDJ_ZJ || this.m_eType == HSType.kDJ_SG || this.m_eType == HSType.kDJ_SL || this.m_eType == HSType.kDJ_GJ || this.m_eType == HSType.kDJ_DB || this.m_eType == HSType.kDJ_DG;
					if (flag7)
					{
						bool flag8 = num > 0.0;
						if (flag8)
						{
							this.m_dNetHigh[0] = num;
						}
						else
						{
							this.m_dElevationOffset -= dHighFromBaseChanged;
						}
					}
					else
					{
						this.m_dElevationOffset += dHighFromBaseChanged;
					}
				}
			}
		}

		public double GetHighFromBase()
		{
			double result = 0.0;
			bool flag = this.IsSupport();
			if (flag)
			{
				bool flag2 = this.m_eType == HSType.kZJ_DC || this.m_eType == HSType.kZJ_PX || this.m_eType == HSType.kZJ_DZ;
				if (flag2)
				{
					result = this.m_dDistFromGround;
				}
			}
			else
			{
				bool flag3 = this.m_eType == HSType.kDJ_DC || this.m_eType == HSType.kDJ_PX || this.m_eType == HSType.kDJ_YC || this.m_eType == HSType.kDJ_PX3 || this.m_eType == HSType.kDJ_DC3 || this.m_eType == HSType.kDJ_DZ;
				if (flag3)
				{
					result = this.m_dDistFromGround;
				}
				else
				{
					result = this.m_dNetHigh[0];
				}
			}
			return result;
		}

		public void SetHighFromBase(double dBaseHigh)
		{
			bool flag = this.IsSupport();
			if (flag)
			{
				bool flag2 = this.m_eType == HSType.kZJ_DC || this.m_eType == HSType.kZJ_PX || this.m_eType == HSType.kZJ_DZ;
				if (flag2)
				{
					this.m_dDistFromGround = dBaseHigh;
				}
			}
			else
			{
				bool flag3 = this.m_eType == HSType.kDJ_DC || this.m_eType == HSType.kDJ_PX || this.m_eType == HSType.kDJ_YC || this.m_eType == HSType.kDJ_PX3 || this.m_eType == HSType.kDJ_DC3 || this.m_eType == HSType.kDJ_DZ;
				if (flag3)
				{
					this.m_dDistFromGround = dBaseHigh;
				}
				else
				{
					this.m_dNetHigh[0] = dBaseHigh;
				}
			}
		}

		public bool IsDefineValid()
		{
			bool flag = this.m_eType == HSType.kZJ_DC || this.m_eType == HSType.kZJ_PX || this.m_eType == HSType.kDJ_DC || this.m_eType == HSType.kDJ_PX || this.m_eType == HSType.kDJ_YC || this.m_eType == HSType.kZJ_DZ || this.m_eType == HSType.kDJ_DZ;
			if (flag)
			{
				bool flag2 = this.m_nFloorNum < 1 || this.m_nFloorNum > 15;
				if (flag2)
				{
					this.m_strErrorInfo = "横担层数有误：1-15层";
					return false;
				}
				for (int i = 1; i < this.m_nFloorNum; i++)
				{
					bool flag3 = this.m_dNetHigh[i] < 1.0;
					if (flag3)
					{
						this.m_strErrorInfo = "横担层高有误";
						return false;
					}
				}
			}
			double num = 50000.0;
			string str = "横担 ";
			string str2 = "竖杆 ";
			string str3 = "斜杆 ";
			bool flag4 = this.m_eType == HSType.kZJ_SJ;
			if (flag4)
			{
				bool flag5 = this.m_dGapHor < 0.0 || this.m_dGapHor > num;
				if (flag5)
				{
					this.m_strErrorInfo = "空隙值有误";
					return false;
				}
				bool flag6 = !this.m_matHor.IsDefineValid();
				if (flag6)
				{
					this.m_strErrorInfo = str + this.m_matHor.m_strErrorInfo;
					return false;
				}
				bool flag7 = !this.m_matVer.IsDefineValid();
				if (flag7)
				{
					this.m_strErrorInfo = str2 + this.m_matVer.m_strErrorInfo;
					return false;
				}
				bool flag8 = !this.m_matLean.IsDefineValid();
				if (flag8)
				{
					this.m_strErrorInfo = str3 + this.m_matLean.m_strErrorInfo;
					return false;
				}
			}
			else
			{
				bool flag9 = this.m_eType == HSType.kZJ_XB || this.m_eType == HSType.kDJ_DB || this.m_eType == HSType.kDJ_DG;
				if (flag9)
				{
					bool flag10 = this.m_eType == HSType.kZJ_XB;
					if (flag10)
					{
						bool flag11 = this.m_dGapHor < 0.0 || this.m_dGapHor > num;
						if (flag11)
						{
							this.m_strErrorInfo = "空隙值有误";
							return false;
						}
					}
					bool flag12 = this.m_eType == HSType.kDJ_DG;
					if (flag12)
					{
						bool flag13 = this.m_dGapHor < 0.0 || this.m_dGapHor > num;
						if (flag13)
						{
							this.m_strErrorInfo = "管径偏移值有误";
							return false;
						}
					}
					bool flag14 = this.m_eType == HSType.kZJ_XB;
					if (flag14)
					{
						bool flag15 = !this.m_matHor.IsDefineValid();
						if (flag15)
						{
							this.m_strErrorInfo = str + this.m_matHor.m_strErrorInfo;
							return false;
						}
					}
					else
					{
						bool flag16 = !this.m_matVer.IsDefineValid();
						if (flag16)
						{
							this.m_strErrorInfo = str2 + this.m_matVer.m_strErrorInfo;
							return false;
						}
					}
				}
				else
				{
					bool flag17 = this.m_dGapHor < 0.0 || this.m_dGapHor > num;
					if (flag17)
					{
						this.m_strErrorInfo = "横担空隙值有误";
						return false;
					}
					bool flag18 = this.m_dGapVer < 0.0 || this.m_dGapVer > num;
					if (flag18)
					{
						this.m_strErrorInfo = "竖杆空隙值有误";
						return false;
					}
					bool flag19 = !this.m_matHor.IsDefineValid();
					if (flag19)
					{
						this.m_strErrorInfo = str + this.m_matHor.m_strErrorInfo;
						return false;
					}
					bool flag20 = !this.m_matVer.IsDefineValid();
					if (flag20)
					{
						this.m_strErrorInfo = str2 + this.m_matVer.m_strErrorInfo;
						return false;
					}
				}
			}
			HSType eType = this.m_eType;
			switch (eType)
			{
			case HSType.kZJ_DC:
			case HSType.kZJ_PX:
			case HSType.kZJ_DZ:
			{
				bool flag21 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
				if (flag21)
				{
					this.m_strErrorInfo = "宽度值有误";
					return false;
				}
				bool flag22 = this.m_dDistFromGround < 1.0 || this.m_dDistFromGround > num;
				if (flag22)
				{
					this.m_strErrorInfo = "根部高度值有误";
					return false;
				}
				bool flag23 = this.m_eType == HSType.kZJ_PX;
				if (flag23)
				{
					bool flag24 = this.m_dPXHigh < 1.0 || this.m_dPXHigh > num;
					if (flag24)
					{
						this.m_strErrorInfo = "偏心高度值有误";
						return false;
					}
					bool flag25 = this.m_dPXWide < 1.0 || this.m_dPXWide > this.m_dNetWide;
					if (flag25)
					{
						this.m_strErrorInfo = "偏心宽度值有误";
						return false;
					}
				}
				break;
			}
			case HSType.kZJ_SJ:
			{
				bool flag26 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
				if (flag26)
				{
					this.m_strErrorInfo = "宽度值有误";
					return false;
				}
				bool flag27 = this.m_dNetHigh[0] < 1.0 || this.m_dNetHigh[0] > num;
				if (flag27)
				{
					this.m_strErrorInfo = "高度值有误";
					return false;
				}
				bool flag28 = this.m_dOffsetY < 1.0 || this.m_dOffsetY >= this.m_dNetHigh[0];
				if (flag28)
				{
					this.m_strErrorInfo = "斜撑高度值有误";
					return false;
				}
				bool flag29 = this.m_dOffsetX < 1.0 || this.m_dOffsetX >= this.m_dNetWide;
				if (flag29)
				{
					this.m_strErrorInfo = "斜撑宽度值有误，宽度值应大于斜撑宽度";
					return false;
				}
				break;
			}
			case HSType.kZJ_XB:
			{
				bool flag30 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
				if (flag30)
				{
					this.m_strErrorInfo = "宽度值有误";
					return false;
				}
				break;
			}
			case HSType.kZJ_CB:
			{
				bool flag31 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
				if (flag31)
				{
					this.m_strErrorInfo = "宽度值有误";
					return false;
				}
				break;
			}
			default:
				switch (eType)
				{
				case HSType.kDJ_DC:
				case HSType.kDJ_PX:
				case HSType.kDJ_DZ:
				{
					bool flag32 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag32)
					{
						this.m_strErrorInfo = "宽度值有误";
						return false;
					}
					bool flag33 = this.m_dDistFromGround < 1.0 || this.m_dDistFromGround > num;
					if (flag33)
					{
						this.m_strErrorInfo = "根部高度值有误";
						return false;
					}
					bool flag34 = this.m_eType == HSType.kDJ_PX;
					if (flag34)
					{
						bool flag35 = this.m_dPXHigh < 1.0 || this.m_dPXHigh > num;
						if (flag35)
						{
							this.m_strErrorInfo = "偏心高度值有误";
							return false;
						}
						bool flag36 = this.m_dPXWide < 1.0 || this.m_dPXWide > this.m_dNetWide;
						if (flag36)
						{
							this.m_strErrorInfo = "偏心宽度值有误";
							return false;
						}
					}
					break;
				}
				case HSType.kDJ_GJ:
				{
					bool flag37 = this.m_dNetHigh[0] < 1.0 || this.m_dNetHigh[0] > num;
					if (flag37)
					{
						this.m_strErrorInfo = "高度值有误";
						return false;
					}
					bool flag38 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag38)
					{
						this.m_strErrorInfo = "宽度值有误";
						return false;
					}
					bool flag39 = this.m_dOffsetX < 0.0 || this.m_dOffsetX > num;
					if (flag39)
					{
						this.m_strErrorInfo = "横担长度增加值有误";
						return false;
					}
					bool flag40 = this.m_dOffsetY < 0.0 || this.m_dOffsetY > num;
					if (flag40)
					{
						this.m_strErrorInfo = "竖杆长度增加值有误";
						return false;
					}
					break;
				}
				case HSType.kDJ_DB:
				{
					bool flag41 = this.m_dNetHigh[0] < 1.0 || this.m_dNetHigh[0] > num;
					if (flag41)
					{
						this.m_strErrorInfo = "高度值有误";
						return false;
					}
					break;
				}
				case HSType.kDJ_DG:
				{
					bool flag42 = this.m_dNetHigh[0] < 1.0 || this.m_dNetHigh[0] > num;
					if (flag42)
					{
						this.m_strErrorInfo = "高度值有误";
						return false;
					}
					bool flag43 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag43)
					{
						this.m_strErrorInfo = "管径值有误";
						return false;
					}
					bool flag44 = this.m_dLoopThick <= 0.0 || this.m_dLoopThick > num;
					if (flag44)
					{
						this.m_strErrorInfo = "管箍厚度值有误";
						return false;
					}
					bool flag45 = this.m_dLoopLength < 1.0 || this.m_dLoopLength > num;
					if (flag45)
					{
						this.m_strErrorInfo = "管箍长度值有误";
						return false;
					}
					break;
				}
				case HSType.kDJ_SG:
				{
					bool flag46 = this.m_dNetHigh[0] < 1.0 || this.m_dNetHigh[0] > num;
					if (flag46)
					{
						this.m_strErrorInfo = "高度值有误";
						return false;
					}
					bool flag47 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag47)
					{
						this.m_strErrorInfo = "宽度值有误";
						return false;
					}
					bool flag48 = this.m_dOffsetX < 0.0 || this.m_dOffsetX > num;
					if (flag48)
					{
						this.m_strErrorInfo = "横担长度增加值有误";
						return false;
					}
					bool flag49 = this.m_dOffsetY < 0.0 || this.m_dOffsetY > num;
					if (flag49)
					{
						this.m_strErrorInfo = "竖杆长度增加值有误";
						return false;
					}
					bool flag50 = this.m_dPXWide < 1.0 || this.m_dPXWide >= this.m_dNetWide;
					if (flag50)
					{
						this.m_strErrorInfo = "偏移值有误";
						return false;
					}
					break;
				}
				case HSType.kDJ_SL:
				{
					bool flag51 = this.m_dNetHigh[0] < 1.0 || this.m_dNetHigh[0] > num;
					if (flag51)
					{
						this.m_strErrorInfo = "高度值有误";
						return false;
					}
					bool flag52 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag52)
					{
						this.m_strErrorInfo = "宽度值有误";
						return false;
					}
					bool flag53 = this.m_dPXWide < 1.0 || this.m_dPXWide >= this.m_dNetWide;
					if (flag53)
					{
						this.m_strErrorInfo = "偏移值有误";
						return false;
					}
					break;
				}
				case HSType.kDJ_ZJ:
				{
					bool flag54 = this.m_dNetHigh[0] < 1.0 || this.m_dNetHigh[0] > num;
					if (flag54)
					{
						this.m_strErrorInfo = "高度值有误";
						return false;
					}
					bool flag55 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag55)
					{
						this.m_strErrorInfo = "宽度值有误";
						return false;
					}
					break;
				}
				case HSType.kDJ_YC:
				{
					bool flag56 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag56)
					{
						this.m_strErrorInfo = "宽度值有误";
						return false;
					}
					bool flag57 = this.m_dDistFromGround < 1.0 || this.m_dDistFromGround > num;
					if (flag57)
					{
						this.m_strErrorInfo = "根部高度值有误";
						return false;
					}
					bool flag58 = this.m_dOffsetX < 0.0 || this.m_dOffsetX > num;
					if (flag58)
					{
						this.m_strErrorInfo = "横担长度增加值有误";
						return false;
					}
					bool flag59 = this.m_dOffsetY < 0.0 || this.m_dOffsetY > num;
					if (flag59)
					{
						this.m_strErrorInfo = "竖杆长度增加值有误";
						return false;
					}
					break;
				}
				case HSType.kDJ_DC3:
				case HSType.kDJ_PX3:
				{
					bool flag60 = this.m_dNetWide < 1.0 || this.m_dNetWide > num;
					if (flag60)
					{
						this.m_strErrorInfo = "宽度值有误";
						return false;
					}
					bool flag61 = this.m_dDistFromGround < 1.0 || this.m_dDistFromGround > num;
					if (flag61)
					{
						this.m_strErrorInfo = "根部高度值有误";
						return false;
					}
					bool flag62 = this.m_eType == HSType.kDJ_PX;
					if (flag62)
					{
						bool flag63 = this.m_dPXHigh < 1.0 || this.m_dPXHigh > num;
						if (flag63)
						{
							this.m_strErrorInfo = "偏心高度值有误";
							return false;
						}
						bool flag64 = this.m_dPXWide < 1.0 || this.m_dPXWide > this.m_dNetWide;
						if (flag64)
						{
							this.m_strErrorInfo = "偏心宽度值有误";
							return false;
						}
					}
					bool flag65 = this.m_dOffsetX > this.m_dNetWide;
					if (flag65)
					{
						this.m_strErrorInfo = "中间杆偏移值有误";
						return false;
					}
					break;
				}
				}
				break;
			}
			return true;
		}

		public double GetWideForVerLink()
		{
			double result = 0.0;
			HSType eType = this.m_eType;
			switch (eType)
			{
			case HSType.kZJ_DC:
			case HSType.kZJ_PX:
			case HSType.kZJ_DZ:
				break;
			case HSType.kZJ_SJ:
				return this.m_dNetWide;
			case HSType.kZJ_XB:
				return this.m_dNetWide;
			case HSType.kZJ_CB:
				return result;
			default:
				switch (eType)
				{
				case HSType.kDJ_DC:
				case HSType.kDJ_PX:
				case HSType.kDJ_GJ:
				case HSType.kDJ_SL:
				case HSType.kDJ_ZJ:
				case HSType.kDJ_YC:
				case HSType.kDJ_DC3:
				case HSType.kDJ_PX3:
				case HSType.kDJ_DZ:
					break;
				case HSType.kDJ_DB:
					return this.m_matVer.m_dHigh;
				case HSType.kDJ_DG:
					return this.m_dNetWide;
				case HSType.kDJ_SG:
					return this.m_dNetWide;
				default:
					return result;
				}
				break;
			}
			result = this.m_dNetWide + this.m_matVer.m_dHigh;
			return result;
		}

		public string GetSizeString()
		{
			string text = "";
			HSType eType = this.m_eType;
			switch (eType)
			{
			case HSType.kZJ_DC:
			case HSType.kZJ_DZ:
				text = text + this.m_dNetWide.ToString("f0") + ":";
				for (int i = 1; i < this.m_nFloorNum; i++)
				{
					text = text + this.m_dNetHigh[i].ToString("f0") + ":";
				}
				break;
			case HSType.kZJ_PX:
				text = text + this.m_dNetWide.ToString("f0") + ":";
				for (int j = 1; j < this.m_nFloorNum; j++)
				{
					text = text + this.m_dNetHigh[j].ToString("f0") + ":";
				}
				text = text + this.m_dPXWide.ToString("f0") + ":";
				text = text + this.m_dPXHigh.ToString("f0") + ":";
				break;
			case HSType.kZJ_SJ:
				text = text + this.m_dNetWide.ToString("f0") + ":";
				text = text + this.m_dNetHigh[0].ToString("f0") + ":";
				text = text + this.m_dOffsetX.ToString("f0") + ":";
				text = text + this.m_dOffsetY.ToString("f0") + ":";
				break;
			case HSType.kZJ_XB:
				text += this.m_dNetWide.ToString("f0");
				break;
			case HSType.kZJ_CB:
				text += this.m_dNetWide.ToString("f0");
				break;
			default:
				switch (eType)
				{
				case HSType.kDJ_DC:
				case HSType.kDJ_DZ:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					for (int k = 1; k < this.m_nFloorNum; k++)
					{
						text = text + this.m_dNetHigh[k].ToString("f0") + ":";
					}
					break;
				case HSType.kDJ_PX:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					for (int l = 1; l < this.m_nFloorNum; l++)
					{
						text = text + this.m_dNetHigh[l].ToString("f0") + ":";
					}
					text = text + this.m_dPXWide.ToString("f0") + ":";
					text = text + this.m_dPXHigh.ToString("f0") + ":";
					break;
				case HSType.kDJ_GJ:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					text = text + this.m_dNetHigh[0].ToString("f0") + ":";
					text = text + this.m_dOffsetX.ToString("f0") + ":";
					text = text + this.m_dOffsetY.ToString("f0") + ":";
					break;
				case HSType.kDJ_DB:
					text = text + this.m_dNetHigh[0].ToString("f0") + ":";
					break;
				case HSType.kDJ_DG:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					text = text + this.m_dNetHigh[0].ToString("f0") + ":";
					break;
				case HSType.kDJ_SG:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					text = text + this.m_dNetHigh[0].ToString("f0") + ":";
					text = text + this.m_dPXWide.ToString("f0") + ":";
					text = text + this.m_dOffsetX.ToString("f0") + ":";
					text = text + this.m_dOffsetY.ToString("f0") + ":";
					break;
				case HSType.kDJ_SL:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					text = text + this.m_dNetHigh[0].ToString("f0") + ":";
					text = text + this.m_dPXWide.ToString("f0") + ":";
					break;
				case HSType.kDJ_ZJ:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					text = text + this.m_dNetHigh[0].ToString("f0") + ":";
					break;
				case HSType.kDJ_YC:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					for (int m = 1; m < this.m_nFloorNum; m++)
					{
						text = text + this.m_dNetHigh[m].ToString("f0") + ":";
					}
					text = text + this.m_dOffsetX.ToString("f0") + ":";
					text = text + this.m_dOffsetY.ToString("f0") + ":";
					break;
				case HSType.kDJ_DC3:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					text = text + this.m_dOffsetX.ToString("f0") + ":";
					for (int n = 1; n < this.m_nFloorNum; n++)
					{
						text = text + this.m_dNetHigh[n].ToString("f0") + ":";
					}
					break;
				case HSType.kDJ_PX3:
					text = text + this.m_dNetWide.ToString("f0") + ":";
					text = text + this.m_dOffsetX.ToString("f0") + ":";
					for (int num = 1; num < this.m_nFloorNum; num++)
					{
						text = text + this.m_dNetHigh[num].ToString("f0") + ":";
					}
					text = text + this.m_dPXWide.ToString("f0") + ":";
					text = text + this.m_dPXHigh.ToString("f0") + ":";
					break;
				}
				break;
			}
			return text;
		}

		public List<HSCalBarInfo> CalHSLength(ref double dTolHigh)
		{
			List<HSCalBarInfo> list = new List<HSCalBarInfo>();
			HSCalBarInfo hscalBarInfo = new HSCalBarInfo(this.m_matHor);
			HSCalBarInfo hscalBarInfo2 = new HSCalBarInfo(this.m_matVer);
			HSCalBarInfo item = new HSCalBarInfo(this.m_matLean);
			hscalBarInfo.m_nBarType = 0;
			hscalBarInfo2.m_nBarType = 1;
			item.m_nBarType = 2;
			HSType eType = this.m_eType;
			switch (eType)
			{
			case HSType.kZJ_DC:
			case HSType.kZJ_DZ:
			{
				dTolHigh = this.m_dDistFromGround + this.m_matHor.m_dHigh;
				for (int i = 1; i < this.m_nFloorNum; i++)
				{
					dTolHigh += this.m_dNetHigh[i] + this.m_matHor.m_dHigh;
				}
				int num = 2;
				bool flag = this.m_eType == HSType.kZJ_DZ;
				if (flag)
				{
					num = 1;
				}
				bool flag2 = this.IsLink_CG();
				if (flag2)
				{
					hscalBarInfo.m_dLength = this.m_dNetWide;
					hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
					list.Add(hscalBarInfo);
					hscalBarInfo2.m_dLength = dTolHigh;
					hscalBarInfo2.m_nSameNum = (long)num;
					list.Add(hscalBarInfo2);
				}
				else
				{
					bool flag3 = this.IsLink_BH();
					if (flag3)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh * (double)num;
						hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh;
						hscalBarInfo2.m_nSameNum = (long)num;
						list.Add(hscalBarInfo2);
					}
					else
					{
						hscalBarInfo.m_dLength = this.m_dNetWide;
						hscalBarInfo.m_nSameNum = (long)(this.m_nFloorNum - 1);
						bool flag4 = hscalBarInfo.m_nSameNum > 0L;
						if (flag4)
						{
							list.Add(hscalBarInfo);
						}
						hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh / 2.0 * (double)num;
						hscalBarInfo.m_nSameNum = 1L;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh - this.m_matHor.m_dHigh / 2.0;
						hscalBarInfo2.m_nSameNum = (long)num;
						list.Add(hscalBarInfo2);
					}
				}
				break;
			}
			case HSType.kZJ_PX:
			{
				dTolHigh = this.m_dDistFromGround + this.m_matHor.m_dHigh;
				for (int j = 1; j < this.m_nFloorNum; j++)
				{
					dTolHigh += this.m_dNetHigh[j] + this.m_matHor.m_dHigh;
				}
				bool flag5 = this.IsLink_CG();
				if (flag5)
				{
					hscalBarInfo.m_dLength = this.m_dNetWide;
					hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
					list.Add(hscalBarInfo);
					hscalBarInfo.m_nSameNum = 1L;
					hscalBarInfo.m_dLength = this.m_dPXWide;
					list.Add(hscalBarInfo);
					hscalBarInfo2.m_dLength = dTolHigh;
					hscalBarInfo2.m_nSameNum = 1L;
					list.Add(hscalBarInfo2);
					hscalBarInfo2.m_dLength = dTolHigh + this.m_dPXHigh + this.m_matHor.m_dHigh;
					hscalBarInfo2.m_nSameNum = 1L;
					list.Add(hscalBarInfo2);
					hscalBarInfo2.m_dLength = this.m_dPXHigh + this.m_matHor.m_dHigh;
					hscalBarInfo2.m_nSameNum = 1L;
					list.Add(hscalBarInfo2);
				}
				else
				{
					bool flag6 = this.IsLink_BH();
					if (flag6)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh * 2.0;
						hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
						list.Add(hscalBarInfo);
						hscalBarInfo.m_nSameNum = 1L;
						hscalBarInfo.m_dLength = this.m_dPXWide + this.m_matVer.m_dHigh * 2.0;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
						hscalBarInfo2.m_dLength = dTolHigh + this.m_dPXHigh + this.m_matHor.m_dHigh;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
						hscalBarInfo2.m_dLength = this.m_dPXHigh + this.m_matHor.m_dHigh;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
					}
					else
					{
						hscalBarInfo.m_dLength = this.m_dNetWide;
						hscalBarInfo.m_nSameNum = (long)(this.m_nFloorNum - 1);
						bool flag7 = hscalBarInfo.m_nSameNum > 0L;
						if (flag7)
						{
							list.Add(hscalBarInfo);
						}
						hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh / 2.0;
						hscalBarInfo.m_nSameNum = 1L;
						list.Add(hscalBarInfo);
						hscalBarInfo.m_dLength = this.m_dPXWide + this.m_matVer.m_dHigh;
						hscalBarInfo.m_nSameNum = 1L;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh - this.m_matHor.m_dHigh / 2.0;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
						hscalBarInfo2.m_dLength = dTolHigh + this.m_dPXHigh + this.m_matHor.m_dHigh / 2.0;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
						hscalBarInfo2.m_dLength = this.m_dPXHigh + this.m_matHor.m_dHigh / 2.0;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
					}
				}
				dTolHigh += this.m_dPXHigh + this.m_matHor.m_dHigh;
				break;
			}
			case HSType.kZJ_SJ:
			{
				dTolHigh = this.m_dNetHigh[0];
				bool flag8 = this.IsLink_CG();
				if (flag8)
				{
					bool flag9 = this.m_matVer.m_strCode == "B";
					if (flag9)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide - this.m_matVer.m_dThick;
					}
					else
					{
						hscalBarInfo.m_dLength = this.m_dNetWide - this.m_matVer.m_dHigh;
					}
					list.Add(hscalBarInfo);
					hscalBarInfo2.m_dLength = this.m_dNetHigh[0];
					bool bHasBarZJSJ_Ver = this.m_bHasBarZJSJ_Ver;
					if (bHasBarZJSJ_Ver)
					{
						list.Add(hscalBarInfo2);
					}
					item.m_dLength = Math.Sqrt(Math.Pow(this.m_dOffsetY, 2.0) + Math.Pow(this.m_dOffsetX, 2.0));
					bool bHasBarZJSJ_Lean = this.m_bHasBarZJSJ_Lean;
					if (bHasBarZJSJ_Lean)
					{
						list.Add(item);
					}
				}
				else
				{
					bool flag10 = this.IsLink_BH();
					if (flag10)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide - this.m_matVer.m_dHigh;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = this.m_dNetHigh[0];
						bool bHasBarZJSJ_Ver2 = this.m_bHasBarZJSJ_Ver;
						if (bHasBarZJSJ_Ver2)
						{
							list.Add(hscalBarInfo2);
						}
						item.m_dLength = Math.Sqrt(Math.Pow(this.m_dOffsetY, 2.0) + Math.Pow(this.m_dOffsetX, 2.0));
						bool bHasBarZJSJ_Lean2 = this.m_bHasBarZJSJ_Lean;
						if (bHasBarZJSJ_Lean2)
						{
							list.Add(item);
						}
					}
					else
					{
						hscalBarInfo.m_dLength = this.m_dNetWide - this.m_matVer.m_dHigh / 2.0;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = this.m_dNetHigh[0] - this.m_matHor.m_dHigh / 2.0;
						list.Add(hscalBarInfo2);
						item.m_dLength = Math.Sqrt(Math.Pow(this.m_dOffsetY, 2.0) + Math.Pow(this.m_dOffsetX, 2.0));
						bool bHasBarZJSJ_Lean3 = this.m_bHasBarZJSJ_Lean;
						if (bHasBarZJSJ_Lean3)
						{
							list.Add(item);
						}
					}
				}
				break;
			}
			case HSType.kZJ_XB:
				hscalBarInfo.m_dLength = this.m_dNetWide;
				dTolHigh = 0.0;
				list.Add(hscalBarInfo);
				break;
			case HSType.kZJ_CB:
				hscalBarInfo.m_dLength = this.m_dNetWide;
				dTolHigh = 0.0;
				list.Add(hscalBarInfo);
				break;
			default:
				switch (eType)
				{
				case HSType.kDJ_DC:
				case HSType.kDJ_DC3:
				case HSType.kDJ_DZ:
				{
					dTolHigh = this.m_dDistFromGround + this.m_matHor.m_dHigh;
					for (int k = 1; k < this.m_nFloorNum; k++)
					{
						dTolHigh += this.m_dNetHigh[k] + this.m_matHor.m_dHigh;
					}
					int num = 2;
					bool flag11 = this.m_eType == HSType.kDJ_DZ;
					if (flag11)
					{
						num = 1;
					}
					bool flag12 = this.IsLink_CG();
					if (flag12)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide;
						hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh;
						hscalBarInfo2.m_nSameNum = (long)num;
						bool flag13 = this.m_eType == HSType.kDJ_DC3;
						if (flag13)
						{
							hscalBarInfo2.m_nSameNum += 1L;
						}
						list.Add(hscalBarInfo2);
					}
					else
					{
						bool flag14 = this.IsLink_BH();
						if (flag14)
						{
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh * (double)num;
							hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh;
							hscalBarInfo2.m_nSameNum = (long)num;
							bool flag15 = this.m_eType == HSType.kDJ_DC3;
							if (flag15)
							{
								hscalBarInfo2.m_nSameNum += 1L;
							}
							list.Add(hscalBarInfo2);
						}
						else
						{
							hscalBarInfo.m_dLength = this.m_dNetWide;
							hscalBarInfo.m_nSameNum = (long)(this.m_nFloorNum - 1);
							bool flag16 = hscalBarInfo.m_nSameNum > 0L;
							if (flag16)
							{
								list.Add(hscalBarInfo);
							}
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh / 2.0 * (double)num;
							hscalBarInfo.m_nSameNum = 1L;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh - this.m_matHor.m_dHigh / 2.0;
							hscalBarInfo2.m_nSameNum = (long)num;
							list.Add(hscalBarInfo2);
							bool flag17 = this.m_eType == HSType.kDJ_DC3;
							if (flag17)
							{
								hscalBarInfo2.m_dLength = dTolHigh;
								hscalBarInfo2.m_nSameNum = 1L;
								list.Add(hscalBarInfo2);
							}
						}
					}
					break;
				}
				case HSType.kDJ_PX:
				case HSType.kDJ_PX3:
				{
					dTolHigh = this.m_dDistFromGround + this.m_matHor.m_dHigh;
					for (int l = 1; l < this.m_nFloorNum; l++)
					{
						dTolHigh += this.m_dNetHigh[l] + this.m_matHor.m_dHigh;
					}
					bool flag18 = this.IsLink_CG();
					if (flag18)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide;
						hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
						list.Add(hscalBarInfo);
						hscalBarInfo.m_nSameNum = 1L;
						hscalBarInfo.m_dLength = this.m_dPXWide;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh;
						hscalBarInfo2.m_nSameNum = 1L;
						bool flag19 = this.m_eType == HSType.kDJ_PX3;
						if (flag19)
						{
							hscalBarInfo2.m_nSameNum += 1L;
						}
						list.Add(hscalBarInfo2);
						hscalBarInfo2.m_dLength = dTolHigh + this.m_dPXHigh + this.m_matHor.m_dHigh;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
						hscalBarInfo2.m_dLength = this.m_dPXHigh + this.m_matHor.m_dHigh;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
					}
					else
					{
						bool flag20 = this.IsLink_BH();
						if (flag20)
						{
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh * 2.0;
							hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
							list.Add(hscalBarInfo);
							hscalBarInfo.m_nSameNum = 1L;
							hscalBarInfo.m_dLength = this.m_dPXWide + this.m_matVer.m_dHigh * 2.0;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh;
							hscalBarInfo2.m_nSameNum = 1L;
							bool flag21 = this.m_eType == HSType.kDJ_PX3;
							if (flag21)
							{
								hscalBarInfo2.m_nSameNum += 1L;
							}
							list.Add(hscalBarInfo2);
							hscalBarInfo2.m_dLength = dTolHigh + this.m_dPXHigh + this.m_matHor.m_dHigh;
							hscalBarInfo2.m_nSameNum = 1L;
							list.Add(hscalBarInfo2);
							hscalBarInfo2.m_dLength = this.m_dPXHigh + this.m_matHor.m_dHigh;
							hscalBarInfo2.m_nSameNum = 1L;
							list.Add(hscalBarInfo2);
						}
						else
						{
							hscalBarInfo.m_dLength = this.m_dNetWide;
							hscalBarInfo.m_nSameNum = (long)(this.m_nFloorNum - 1);
							bool flag22 = hscalBarInfo.m_nSameNum > 0L;
							if (flag22)
							{
								list.Add(hscalBarInfo);
							}
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh / 2.0;
							hscalBarInfo.m_nSameNum = 1L;
							list.Add(hscalBarInfo);
							hscalBarInfo.m_dLength = this.m_dPXWide + this.m_matVer.m_dHigh;
							hscalBarInfo.m_nSameNum = 1L;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh - this.m_matHor.m_dHigh / 2.0;
							hscalBarInfo2.m_nSameNum = 1L;
							list.Add(hscalBarInfo2);
							hscalBarInfo2.m_dLength = dTolHigh + this.m_dPXHigh + this.m_matHor.m_dHigh / 2.0;
							hscalBarInfo2.m_nSameNum = 1L;
							list.Add(hscalBarInfo2);
							hscalBarInfo2.m_dLength = this.m_dPXHigh + this.m_matHor.m_dHigh / 2.0;
							hscalBarInfo2.m_nSameNum = 1L;
							list.Add(hscalBarInfo2);
							bool flag23 = this.m_eType == HSType.kDJ_PX3;
							if (flag23)
							{
								hscalBarInfo2.m_dLength = dTolHigh;
								hscalBarInfo2.m_nSameNum = 1L;
								list.Add(hscalBarInfo2);
							}
						}
					}
					dTolHigh += this.m_dPXHigh + this.m_matHor.m_dHigh;
					break;
				}
				case HSType.kDJ_GJ:
					hscalBarInfo.m_dLength = this.m_dNetWide + this.m_dOffsetX * 2.0;
					list.Add(hscalBarInfo);
					hscalBarInfo2.m_dLength = this.m_dNetHigh[0] + this.m_dOffsetY;
					hscalBarInfo2.m_nSameNum = 2L;
					list.Add(hscalBarInfo2);
					dTolHigh = hscalBarInfo2.m_dLength;
					break;
				case HSType.kDJ_DB:
					hscalBarInfo2.m_dLength = this.m_dNetHigh[0];
					list.Add(hscalBarInfo2);
					dTolHigh = hscalBarInfo2.m_dLength;
					break;
				case HSType.kDJ_DG:
					hscalBarInfo2.m_dLength = this.m_dNetHigh[0];
					list.Add(hscalBarInfo2);
					dTolHigh = hscalBarInfo2.m_dLength;
					break;
				case HSType.kDJ_SG:
					hscalBarInfo.m_dLength = this.m_dNetWide + this.m_dOffsetX * 2.0;
					list.Add(hscalBarInfo);
					hscalBarInfo2.m_dLength = this.m_dNetHigh[0] + this.m_dOffsetY;
					hscalBarInfo2.m_nSameNum = 3L;
					list.Add(hscalBarInfo2);
					dTolHigh = hscalBarInfo2.m_dLength;
					break;
				case HSType.kDJ_SL:
				{
					dTolHigh = this.m_dNetHigh[0];
					bool flag24 = this.IsLink_CG();
					if (flag24)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide;
						hscalBarInfo.m_nSameNum = 1L;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh + this.m_matHor.m_dHigh;
						hscalBarInfo2.m_nSameNum = 2L;
						list.Add(hscalBarInfo2);
						hscalBarInfo2.m_dLength = dTolHigh;
						hscalBarInfo2.m_nSameNum = 1L;
						list.Add(hscalBarInfo2);
					}
					else
					{
						bool flag25 = this.IsLink_BH();
						if (flag25)
						{
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh * 2.0;
							hscalBarInfo.m_nSameNum = 1L;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh + this.m_matHor.m_dHigh;
							hscalBarInfo2.m_nSameNum = 3L;
							list.Add(hscalBarInfo2);
						}
						else
						{
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh;
							hscalBarInfo.m_nSameNum = 1L;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh + this.m_matHor.m_dHigh / 2.0;
							hscalBarInfo2.m_nSameNum = 2L;
							list.Add(hscalBarInfo2);
							hscalBarInfo2.m_dLength = dTolHigh;
							hscalBarInfo2.m_nSameNum = 1L;
							list.Add(hscalBarInfo2);
						}
					}
					dTolHigh += this.m_matHor.m_dHigh;
					break;
				}
				case HSType.kDJ_ZJ:
				{
					dTolHigh = this.m_dNetHigh[0];
					bool flag26 = this.IsLink_CG();
					if (flag26)
					{
						hscalBarInfo.m_dLength = this.m_dNetWide;
						list.Add(hscalBarInfo);
						hscalBarInfo2.m_dLength = dTolHigh + this.m_matHor.m_dHigh;
						list.Add(hscalBarInfo2);
					}
					else
					{
						bool flag27 = this.IsLink_BH();
						if (flag27)
						{
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh + this.m_matHor.m_dHigh;
							list.Add(hscalBarInfo2);
						}
						else
						{
							hscalBarInfo.m_dLength = this.m_dNetWide + this.m_matVer.m_dHigh / 2.0;
							list.Add(hscalBarInfo);
							hscalBarInfo2.m_dLength = dTolHigh + this.m_matHor.m_dHigh / 2.0;
							list.Add(hscalBarInfo2);
						}
					}
					dTolHigh += this.m_matHor.m_dHigh;
					break;
				}
				case HSType.kDJ_YC:
					dTolHigh = this.m_dDistFromGround + this.m_matHor.m_dHigh;
					for (int m = 1; m < this.m_nFloorNum; m++)
					{
						dTolHigh += this.m_dNetHigh[m] + this.m_matHor.m_dHigh;
					}
					hscalBarInfo.m_dLength = this.m_dNetWide + this.m_dOffsetX * 2.0 + this.m_matVer.m_dHigh * 2.0;
					hscalBarInfo.m_nSameNum = (long)this.m_nFloorNum;
					list.Add(hscalBarInfo);
					hscalBarInfo2.m_dLength = dTolHigh + this.m_dOffsetY;
					hscalBarInfo2.m_nSameNum = 2L;
					list.Add(hscalBarInfo2);
					dTolHigh = hscalBarInfo2.m_dLength;
					break;
				}
				break;
			}
			return list;
		}

		public void SetSectionType(string strType)
		{
			HSType eType = this.m_eType;
			switch (eType)
			{
			case HSType.kZJ_SJ:
				this.m_matHor.SetTypeCode(strType[0].ToString());
				this.m_matVer.SetTypeCode(strType[1].ToString());
				this.m_matLean.SetTypeCode(strType[2].ToString());
				break;
			case HSType.kZJ_XB:
				this.m_matHor.SetTypeCode(strType[0].ToString());
				break;
			case HSType.kZJ_CB:
				this.m_matHor.SetTypeCode(strType[0].ToString());
				break;
			default:
				if (eType != HSType.kDJ_DB)
				{
					if (eType != HSType.kDJ_DG)
					{
						this.m_matHor.SetTypeCode(strType[0].ToString());
						this.m_matVer.SetTypeCode(strType[1].ToString());
					}
					else
					{
						this.m_matVer.SetTypeCode(strType[0].ToString());
					}
				}
				else
				{
					this.m_matVer.SetTypeCode(strType[0].ToString());
				}
				break;
			}
		}

		public bool GetHSFamilyName(ref string strFamilyName, ref string strSymbolType, UIApplication uiApp)
		{
			strSymbolType = "";
			strFamilyName = "";
			string text = "HYHS_";
			string str = "";
			string text2 = this.m_matHor.m_strCode;
			text2 += this.m_matVer.m_strCode;
			bool flag = this.m_eType == HSType.kZJ_SJ;
			if (flag)
			{
				text2 += this.m_matLean.m_strCode;
			}
			HSType eType = this.m_eType;
			string text3;
			string text4;
			switch (eType)
			{
			case HSType.kZJ_DC:
				text3 = "ZJDC_";
				strSymbolType = "支架";
				text4 = this.m_nFloorNum.ToString();
				break;
			case HSType.kZJ_PX:
				text3 = "ZJPX_";
				strSymbolType = "偏心支架";
				text4 = this.m_nFloorNum.ToString();
				break;
			case HSType.kZJ_SJ:
				text3 = "ZJSJ_";
				strSymbolType = "三角支架";
				text4 = "";
				break;
			case HSType.kZJ_XB:
				text3 = "ZJXB_";
				strSymbolType = "悬臂支架";
				text4 = "";
				text2 = this.m_matHor.m_strCode;
				break;
			case HSType.kZJ_CB:
				text3 = "ZJCB_";
				strSymbolType = "侧壁支架";
				text4 = "";
				text2 = this.m_matHor.m_strCode;
				break;
			case HSType.kZJ_DZ:
				text3 = "ZJDZ_";
				strSymbolType = "直角支架";
				text4 = this.m_nFloorNum.ToString();
				break;
			case HSType.kZJ_TQ:
				text3 = "ZJTQ_";
				strSymbolType = "管廊立柱贴墙支架";
				text4 = this.m_nFloorNum.ToString();
				break;
			case HSType.kZJ_DQ:
				text3 = "ZJDQ_";
				strSymbolType = "管廊两侧立柱支架";
				text4 = this.m_nFloorNum.ToString();
				break;
			default:
				switch (eType)
				{
				case HSType.kDJ_DC:
					text3 = "DJDC_";
					strSymbolType = "吊架";
					text4 = this.m_nFloorNum.ToString();
					break;
				case HSType.kDJ_PX:
					text3 = "DJPX_";
					strSymbolType = "偏心吊架";
					text4 = this.m_nFloorNum.ToString();
					break;
				case HSType.kDJ_GJ:
					text3 = "DJGJ_";
					strSymbolType = "钢筋吊架";
					text4 = "";
					break;
				case HSType.kDJ_DB:
					text3 = "DJDB_";
					strSymbolType = "单臂吊架";
					text4 = "";
					text2 = this.m_matVer.m_strCode;
					break;
				case HSType.kDJ_DG:
					text3 = "DJDG_";
					strSymbolType = "单管吊架";
					text4 = "";
					text2 = this.m_matVer.m_strCode;
					break;
				case HSType.kDJ_SG:
					text3 = "DJSG_";
					strSymbolType = "三列钢筋吊架";
					text4 = "";
					break;
				case HSType.kDJ_SL:
					text3 = "DJSL_";
					strSymbolType = "三列吊架";
					text4 = "";
					break;
				case HSType.kDJ_ZJ:
					text3 = "DJZJ_";
					strSymbolType = "直角吊架";
					text4 = "";
					break;
				case HSType.kDJ_YC:
					text3 = "DJYC_";
					strSymbolType = "延长背焊吊架";
					text4 = this.m_nFloorNum.ToString();
					break;
				case HSType.kDJ_DC3:
					text3 = "DJDC3_";
					strSymbolType = "三列吊架";
					text4 = this.m_nFloorNum.ToString();
					break;
				case HSType.kDJ_PX3:
					text3 = "DJPX3_";
					strSymbolType = "偏心三列吊架";
					text4 = this.m_nFloorNum.ToString();
					break;
				case HSType.kDJ_DZ:
					text3 = "DJDZ_";
					strSymbolType = "直角吊架";
					text4 = this.m_nFloorNum.ToString();
					break;
				default:
					return false;
				}
				break;
			}
			bool bExtendToTop = this.m_bExtendToTop;
			if (bExtendToTop)
			{
				text3 += "YD_";
			}
			string str2;
			switch (this.m_eLinkType)
			{
			case HSLinkType.kLinkCG:
				str2 = "CG";
				break;
			case HSLinkType.kLinkDH:
				str2 = "DH";
				break;
			case HSLinkType.kLinkBH:
				str2 = "BH";
				break;
			default:
				return false;
			}
			strFamilyName = text;
			strFamilyName += text3;
			strFamilyName += str2;
			strFamilyName += text2;
			bool flag2 = text4 != "";
			if (flag2)
			{
				strFamilyName += "_";
				strFamilyName += text4;
				str = "层";
			}
			text4 += str;
			text4 += strSymbolType;
			strSymbolType = text4;
			string versionNumber = uiApp.Application.VersionNumber;
			strFamilyName = strFamilyName + "_" + versionNumber;
			strFamilyName = strFamilyName + "_" + HSDefineInfo.g_HS_FAMILY_VER;
			return true;
		}

		public static string g_HS_FAMILY_VER = "1.07";

		public string m_strName;

		public string m_strBmp;

		public string m_strTip;

		public HSType m_eType;

		public HSLinkType m_eLinkType;

		public HSLinkDevice m_eLinkDevice1;

		public HSLinkDevice m_eLinkDevice2;

		public HSLinkDevice m_eLinkDevice3;

		public HSLinkDevice[] m_eLinkDeviceDZ;

		public HSMatInfo m_matVer;

		public HSMatInfo m_matHor;

		public HSMatInfo m_matLean;

		public double m_dNetWide;

		public string m_strElevationName;

		public double m_dElevationOffset;

		public double m_dElevation;

		public double m_dDistFromGround;

		public int m_nFloorNum;

		public double[] m_dNetHigh;

		public double m_dOffsetX;

		public double m_dOffsetY;

		public double m_dPXHigh;

		public double m_dPXWide;

		public double m_dPXStartLen;

		public double m_dGapHor;

		public double m_dGapVer;

		public double m_dLoopDiameter;

		public double m_dLoopThick;

		public double m_dLoopLength;

		public double m_dLinkWide;

		public double m_dLinkHigh;

		public double m_dLinkThick;

		public string m_strErrorInfo;

		public bool m_bHasBarZJSJ_Ver;

		public bool m_bHasBarZJSJ_Lean;

		public SizeViewType m_kViewType;

		public double m_dHangerDBOffsetDist;

		public bool m_bMirrored;

		public bool m_bIsVerPipe;

		public XYZ m_ptBase;

		public bool m_bChangeOnlyBaseHigh;

		public bool m_bExtendToTop;

		public double m_dTunnelCompartmentHeight;
	}
}
